﻿project(libAcoustX CXX)

file(GLOB_RECURSE SOURCES 
"src/*.cpp" 
"src/*.c" 
"src/*.h" 
"include/*.h" 
"include/*.hpp" 
"${CMAKE_SOURCE_DIR}/include/*.h"
)

set(PROJECT_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/include)
set(MODULE_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include)
set(MODULE_INCLUDE_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src)

add_library(${PROJECT_NAME} SHARED ${SOURCES})
add_third(${PROJECT_NAME} libGeoutils)
add_third(${PROJECT_NAME} libNCore)
add_third(${PROJECT_NAME} NDimsArray)
add_third(${PROJECT_NAME} Poco)
assign_source_group(${SOURCES})

target_include_directories(${PROJECT_NAME} PUBLIC
    $<BUILD_INTERFACE:${PROJECT_INCLUDE_DIR}>
    $<BUILD_INTERFACE:${MODULE_INCLUDE_DIR}>
    $<BUILD_INTERFACE:${MODULE_INCLUDE_SRC_DIR}>
    $<INSTALL_INTERFACE:${PROJECT_INCLUDE_DIR}>
)

if(BUILD_SHARED)
    target_compile_definitions(${PROJECT_NAME} PRIVATE LIB_AX_BUILD)
endif()

copy_third_party_dlls_to_output(${PROJECT_NAME})
install_as_third_party(${PROJECT_NAME})
